<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="UTF-8">
		<title>状态伪类选择器</title>
		<style>
			* {
				padding: 0;
				margin: 0;
			}
			
			/* 选中可用状态的input */
			/*input:enabled {
				border: 5px solid red;
			}*/
			
			/*
				选中禁用状态下的input
			*/
			/*input:disabled {
				background-color: skyblue;
			}*/
			
			/*
				选中聚焦状态下的输入框
			*/
			input:focus {
				outline: none;
			}
			
			/*
				选中被选中的input
			*/
			input:checked {
				margin-left: 100px;
			}
			
			/* 通用兄弟选择器, 选中p后面的所有同级div元素 */
			p~div {
				background-color: red;
				margin-bottom: 20px;
			}
			p:hover~.blue {
				background-color: blue;
			}

			/* 否定伪类选择器 */
			ul>li:not(.red) {
				background-color: blue;
			}
			
			/*
				目标伪类选择器
			*/
			:target {
				border: 10px solid yellow;
				padding: 50px;
			}

		</style>
	</head>
	<body>

		<input type="text">
		<input type="text" disabled>
		<input type="text">
		<input type="text">
		<input type="text">

		<input type="radio" name="gender">
		<input type="radio" name="gender">

		<p>1</p>
		<div>2</div>
		<div class="blue">3</div>
		<div>4</div>

		<ul id="ul">
			<li>1</li>
			<li>2</li>
			<li class="red">3</li>
			<li>4</li>
			<li>5</li>
		</ul>

		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<a href="#ul">跳到ul</a>
	</body>
</html>







